<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改入库单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-warehousingEntry-edit" th:object="${warehousingEntry}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">入库单号：</label>
                <div class="col-sm-8">
                    <input name="entryOrderId" th:field="*{entryOrderId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">采购部门：</label>
                <div class="col-sm-8">
                    <input name="procurementDepartment" th:field="*{procurementDepartment}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用部门：</label>
                <div class="col-sm-8">
                    <input name="userDepartment" th:field="*{userDepartment}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">到货单号：</label>
                <div class="col-sm-8">
                    <input name="deliveryId" th:field="*{deliveryId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">业务员：</label>
                <div class="col-sm-8">
                    <input name="salesman" th:field="*{salesman}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工程项目：</label>
                <div class="col-sm-8">
                    <input name="project" th:field="*{project}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">仓库：</label>
                <div class="col-sm-8">
                    <input name="warehouse" th:field="*{warehouse}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">采购经办人：</label>
                <div class="col-sm-8">
                    <input name="purchaser" th:field="*{purchaser}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">合同编号：</label>
                <div class="col-sm-8">
                    <input name="contractId" th:field="*{contractId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">审核员：</label>
                <div class="col-sm-8">
                    <input name="reviewedBy" th:field="*{reviewedBy}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">仓库主管：</label>
                <div class="col-sm-8">
                    <input name="supervisor" th:field="*{supervisor}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">仓管员：</label>
                <div class="col-sm-8">
                    <input name="storekeeper" th:field="*{storekeeper}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">入库时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="entryTime" th:value="${#dates.format(warehousingEntry.entryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">供应商：</label>
                <div class="col-sm-8">
                    <input name="supplier" th:field="*{supplier}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "warehouse/warehousingEntry";
        $("#form-warehousingEntry-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-warehousingEntry-edit').serialize());
            }
        }

        $("input[name='entryTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>